package cn.maxhou.t0002;

import cn.maxhou.t0002.impl.ValidatorServiceImpl;

public class Testvalidate {
    public static void main(String[] args) {
        ValidatorService service=(ValidatorService) ValidationProxy.newInstance(new ValidatorServiceImpl());

        try{
            service.validateParameter(5.5);
            service.validateParameter(-1.0);
            service.validateParameter(11.0);
            service.validateParameter(null);
        }catch (ValidationException e){
            System.out.println("Validation failed: "+e.getMessage());
        }
    }
}
